package Algorithms.chapter1;

public class EX13 {
    public static void TransposedMatrix(int [][] matrix){
        for(int i=0;i<matrix[0].length;i++){
            for(int j=0;j<matrix.length;j++){
                System.out.printf("%4d",matrix[j][i]);
            }
            System.out.println();
        }
    }
    public static void Matrix(int [][] matrix){
        for(int i=0;i<matrix.length;i++){
            for(int j=0;j<matrix[0].length;j++){
                System.out.printf("%4d",matrix[i][j]);
            }
            System.out.println();
        }
    }

    public static void main(String[] args) {
        int [][]a={{1,2,3},{4,5,6}};
        Matrix(a);
        System.out.println();
        TransposedMatrix(a);

    }



}
